home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global fxTrackingObj, version
- set cLoc to the clickLoc
- set c to the clickOn
- set H to the locH of cLoc - the locH of sprite c
- set v to the locV of cLoc - the locV of sprite c
- if H > 21 then
- exit
- end if
- if v > 13 then
- set action to "get"
- else
- set action to "set"
- end if
- repeat while the stillDown
- set H to the mouseH - the locH of sprite c
- set v to the mouseV - the locV of sprite c
- set n to ((H - 21) / 18) + 1 + (v / 13 * 4)
- if (H < 21) or (v < 0) or (v > 26) or (n < 1) or (n > 8) then
- set the member of sprite c to member ("memory" && action)
- else
- set the member of sprite c to member ("memory" && action && n)
- end if
- updateStage()
- end repeat
- if (H < 21) or (v < 0) or (v > 26) or (n < 1) or (n > 8) then
- exit
- end if
- if not objectp(fxTrackingObj) then
- exit
- end if
- if value(char 1 to 3 of version) < 6 then
- alert("Memory buttons require Director 6 or later.")
- exit
- end if
- if action = "set" then
- setMemory(fxTrackingObj, n)
- else
- if action = "get" then
- getMemory(fxTrackingObj, n)
- end if
- end if
- set the member of sprite c to member "memory"
- puppetSprite(c, 0)
- end
-